<!DOCTYPE html>
<html xmlns:layout="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="UTF-8">
	<title>在线测验系统</title>
	<meta name="viewport"
		content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
	<link rel="stylesheet" th:href="@{/plug/element-ui/theme-chalk/index.css}" />
	<link rel="stylesheet" th:href="@{/plug/vant/lib/index.css}" />
	<link rel="stylesheet" th:href="@{/css/index.css}" />
	<script th:src="@{/plug/vue/vue.js}"></script>
	<script th:src="@{/plug/axios/axios.min.js}"></script>
	<script th:src="@{/plug/axios/request.js}"></script>
	<script th:src="@{/plug/element-ui/index.js}"></script>
	<script th:src="@{/plug/vant/lib/vant.min.js}"></script>
	<script th:src="@{/js/index.js}"></script>
	<style>
		.answer-group {
			padding: 0 16px;
		}

		.answer-group .van-radio {
			margin-bottom: 8px;
		}
	</style>
</head>

<body>
	<div id="mainApp">
		<van-row>
			<van-nav-bar title="用户登录" left-arrow @click-left="onReback">
				<template #left>
					<van-icon name="arrow-left" />
				</template>
				<template #right>

				</template>
			</van-nav-bar>
		</van-row>
		<van-row style="margin-top:30%">
			<h2 class="van-doc-demo-block__title" style="text-align: center;">
				<van-image
				  round
				  width="10rem"
				  height="10rem"
				  src="/img/head.png"
				>
				</van-image>
			</h2>
			<van-form >
				<div style="margin: 16px;text-align: center;">
					<van-button round plain type="info" @click="goLogin">&nbsp;&nbsp;登录&nbsp;&nbsp;</van-button>
				</div>
			</van-form>
		</van-row>
	</div>
	<script type="text/javascript">
		const mainApp = {
			el: '#mainApp',
			data: {
			},
			mounted() {
				
			},
			computed: {
				
			},
			methods: {
				onReback(topic, index) {
					history.back();
				},
				goLogin() {
					let that = this
					postRequst('/user/logon', {openId: 1}, true).then(function (resp) {
						if(resp){
							setLoginId(1)
							window.location.href = '/user/my'
						}else{
							this.$toast.fail('登录失败');
						}
					})
				},
			}
		}
		let vueData = {

		}
		let vueMethods = {

		}
		function vueCreated() {

		}
	</script>
	<script th:src="@{/js/VueCreate.js}"></script>
</body>

</html>